package com.xiaoai.juc;


import java.util.function.Consumer;
import java.util.function.Function;

/**
 * 函数式接口：
 * Function
 * Prodicate 断定型接口
 * Consumer 消费型接口，只有输入没有返回
 * Supplier 供给型接口
 *
 * @Author
 * @Date 2021-09-22 00:45
 */
public class fun1_Consumer {
    
    public static void main(String[] args){

        Consumer<String> consumer = new Consumer<String>() {
            @Override
            public void accept(String str) {
                System.out.println("消费："+str);
            }
        };
        consumer.accept("asd");

    }
}
